`ifndef _ral_sys_PPU_REG_rtl_
`define _ral_sys_PPU_REG_rtl_

`include "vmm_ral_host_itf.sv"

module ral_sys_PPU_REG_rtl(vmm_ral_host_itf.slave hst,
                           vmm_ral_host_itf.master ppu_reg);
always @(*)
   begin
      hst.ack = 0;
      ppu_reg.sel[3:0] = 'b0;
      if (hst.adr >= 'h0 && hst.adr < 'h8201) begin
         ppu_reg.sel[3:0] = hst.sel[3:0];
      end

   end




assign ppu_reg.adr = hst.adr - 'h0;
assign ppu_reg.wdat[31:0] = hst.wdat[31:0];
assign ppu_reg.wen = hst.wen;


reg [31:0] _hst_rdat;
always @(*)
   begin: hst_muxout
      unique casez ({|ppu_reg.sel[3:0]})
         1'b1: begin
            _hst_rdat = ppu_reg.rdat[31:0];
            hst.ack = ppu_reg.ack;
         end
         default: begin
            _hst_rdat = 0;
            hst.ack = 0;
         end
      endcase
   end
assign hst.rdat[31:0] = _hst_rdat;


endmodule
`endif

